/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.agenda.model.entity;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;
import javax.validation.constraints.NotNull;

/**
 *
 * @author Ronildo
 */
@Embeddable
public class AmTbUsuaSistMediPK implements Serializable {
    @Basic(optional = false)
    @NotNull
    @Column(name = "CD_USUA")
    private int cdUsua;
    @Basic(optional = false)
    @NotNull
    @Column(name = "CD_MEDI")
    private int cdMedi;

    public AmTbUsuaSistMediPK() {
    }

    public AmTbUsuaSistMediPK(int cdUsua, int cdMedi) {
        this.cdUsua = cdUsua;
        this.cdMedi = cdMedi;
    }

    public int getCdUsua() {
        return cdUsua;
    }

    public void setCdUsua(int cdUsua) {
        this.cdUsua = cdUsua;
    }

    public int getCdMedi() {
        return cdMedi;
    }

    public void setCdMedi(int cdMedi) {
        this.cdMedi = cdMedi;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) cdUsua;
        hash += (int) cdMedi;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof AmTbUsuaSistMediPK)) {
            return false;
        }
        AmTbUsuaSistMediPK other = (AmTbUsuaSistMediPK) object;
        if (this.cdUsua != other.cdUsua) {
            return false;
        }
        if (this.cdMedi != other.cdMedi) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.agenda.model.entity.AmTbUsuaSistMediPK[ cdUsua=" + cdUsua + ", cdMedi=" + cdMedi + " ]";
    }
    
}
